package com.example.demo.task;

import java.time.LocalTime;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class SchedulerTask {
	private Integer count = 0;

	@Scheduled(cron = "*/5 * * * * ?")
	private void process() {
		System.out.println("SchedulerTask running " + (count++) + " 次...");
		System.out.println("SchedulerTask Date:" + LocalTime.now());
	}
}
